<template>
  <div>
    <DialogStyle>
      <el-dialog
        :visible="isShow"
        width="750px"
        title="区域详情"
        @close="closeFn"
        @open="openFn"
      >

        <el-table
          :data="tableData"
          border

          style="width: 100%;height=100%"
        >
          <el-table-column
            type="index"
            label="序号"
            width="90"
          />
          <el-table-column
            prop="innerCode"
            label="机器编号"
          />
          <el-table-column
            prop="vmStatus"
            label="设备状态"
          />
          <el-table-column
            prop="lastSupplyTime"
            label="最后一次供货时间"
          />
        </el-table>

      </el-dialog>
    </DialogStyle>

  </div>
</template>

<script>
import statusInfo from '@/utils/statusInfo'
import { pontInfoApi } from '@/api'
import TimeStyle from '@/utils/TimeStyle'
export default {
  props: {
    rowList: {
      type: Object,
      default: () => {}
    },
    isShow: {
      type: Boolean,
      default: false
    },
    formList: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {
      tableData: []
    }
  },
  methods: {
    // 关闭弹窗前的回调
    closeFn() {
      this.$emit('closeDialogFn')
    },
    async openFn() {
      const res = await pontInfoApi(this.rowList.id)
      this.tableData = res
      TimeStyle(this.tableData)
      statusInfo(this.tableData)
      console.log(res, '11111111111')
    }
  }
}
</script>

<style>
.Info{
  padding-left: 100px ;
}
</style>
